package com.qeegoo.b2bautozityp.injector.module;

import android.app.Activity;
import android.support.v7.widget.LinearLayoutManager;

import com.qeegoo.b2bautozityp.api.RequestApi;
import com.qeegoo.b2bautozityp.injector.PerActivity;
import com.qeegoo.b2bautozityp.moudle.goods.viewmodel.GoodsManagerViewModel;
import com.qeegoo.b2bautozityp.moudle.goods.viewmodel.GoodsSearchViewModel;

import dagger.Module;
import dagger.Provides;

/**
 * 王少岩 在 2017/9/13 创建了它
 */

@Module
public class GoodsManagerModule {
    @Provides
    @PerActivity
    public GoodsManagerViewModel provideModel1(RequestApi api) {

        return new GoodsManagerViewModel(api);
    }
    @Provides
    @PerActivity
    public GoodsSearchViewModel provideModel(RequestApi api) {

        return new GoodsSearchViewModel(api);
    }
    @Provides
    @PerActivity
    public LinearLayoutManager provideLinearLayoutManager(Activity activity) {
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(activity);
        return linearLayoutManager;
    }
}
